package nina.yiyou.performance.s11collect.start

import java.nio.file.Path
import java.nio.file.Paths

class PerformCollectArgsParser {

  interface Result {

    Path workshopPath()
  }

  PerformCollectArgsParser(String[] args) {
    _args = args
  }

  Result parse() {
    def outer = this
    return new Result() {
      @Override
      Path workshopPath() {
        return outer.workshopPath()
      }
    }
  }

  private Path workshopPath() {
    return Paths.get(_args ? _args[0]
        : /C:\Users\luj\Desktop\nina_yiyou\nina_workshop\ninaworkshop_yiyou1.1.xlsm/)
  }

  private final String[] _args
}
